//
//  InformationChannelCell.m
//  BMProject
//
//  Created by chris on 16/1/2.
//  Copyright © 2016年 BMProject. All rights reserved.
//

#import "InformationChannelCell.h"
#import "DataModel.h"
#import "NSDate+Utils.h"

@implementation InformationChannelCell

- (void)awakeFromNib {
    // Initialization code
    self.backgroundColor = [UIColor colorWithRed:0.94 green:0.94 blue:0.94 alpha:1];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setCellInfo:(JSONModel *)info {
    [super setCellInfo:info];
    StoresListModel *model = info;
    _nameLa.text = model.auditor;
    NSString *time = [[NSDate dateWithString:model.auditTime formatString:@"yyyyMMddHHmmss"] formatStringWithFormat:@"yyyy-MM-dd"];
    _dateLa.text = time;
    if(model.sign.intValue == 4 || model.sign.intValue == 2 || model.sign.intValue == 3){
        _opinionLa.text = @"同意";
    }else if(model.sign.intValue == 5){
        _opinionLa.text = [@"不同意,原因:" stringByAppendingString:[NSString ignoreEmptyStr:model.reson]];
    }else{
        _opinionLa.text = @"";
    }
}



@end
